Test improvement for OID cast index scan optimization#4873
Conversation
Signed-off-by: Rucha Kulkarni <ruchask@amazon.com>
Signed-off-by: Rucha Kulkarni <ruchask@amazon.com>
Signed-off-by: Rucha Kulkarni <ruchask@amazon.com>
|
/code-review |
kuntalghosh
left a comment
There was a problem hiding this comment.
AI Code Review
Verdict: APPROVE
Based on the provided code changes, here are my feedback and suggestions:
This PR addresses review feedback from the OID cast index scan optimization (PR #4868) with two clean changes:
-
Include reordering in
hooks.c— Pure alphabetical sorting of#includedirectives. No headers were added or removed; the set of included headers is identical before and after. No executable code was changed. -
Volatile function test (Test 23) — Well-constructed regression test that disables sequential scan, queries with
random()::int(a volatile expression), and verifies the planner produces a "Seq Scan (Disabled: true)" rather than an Index Scan. This proves thecontain_volatile_functionsguard in the hook correctly prevents the OID cast index optimization when the comparison value is volatile.
No blocking issues found.
Issue 1 (Advisory) - PR Description: Empty test scenario checklist:
The "Test Scenarios Covered" section in the PR template has all bullet items left blank. While the description body adequately explains the test being added (volatile function guard verification), filling in at least the "Use case based" bullet would improve clarity for future readers.
Notes
- Security review completed on
hooks.c: 0 findings. The change is a pure include reordering with no security impact. - The test correctly restores
enable_seqscantoonafter the test, preventing state leakage to subsequent tests. - Both standard and parallel_query expected output files are updated consistently.
- Cherry-picked from PR #4872 targeting a different branch — base branch
BABEL_6_X_DEVis appropriate.
Note: This AI review is meant to augment, not replace, human review. Use the suggestions with discretion.
9982e51
into
babelfish-for-postgresql:BABEL_6_X_DEV
Description
Cherry-picked from : #4872
This PR addresses review feedback from the OID cast index scan optimization PR that was merged earlier:
Regarding other AI review comments:
Issues Resolved
Task: BABEL-6814
Authored-by: Rucha Kulkarni ruchask@amazon.com
Signed-off-by: Rucha Kulkarni ruchask@amazon.com
Test Scenarios Covered
Use case based - Yes
Boundary conditions -
Arbitrary inputs -
Negative test cases - Yes
Minor version upgrade tests -
Major version upgrade tests -
Performance tests -
Tooling impact -
Client tests -
Check List
By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.